package com.len.controller;

import com.len.base.BaseController;
import com.len.entity.SpGoodstype;
import com.len.service.SpGoodsService;
import com.len.service.SpGoodstypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("goodsType")
public class SpGoodstypeController extends BaseController<SpGoodstype> {
    @Autowired
    private SpGoodstypeService spGoodstypeService;
    @RequestMapping("/show")
    public String show(SpGoodstype spGoodstype){
        try {
            spGoodstypeService.selectByPrimaryKey(spGoodstype);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/update")
    public String update(SpGoodstype spGoodstype){
        try {
            spGoodstypeService.updateByPrimaryKey(spGoodstype);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/save")
    public String save(SpGoodstype spGoodstype){
        try {
            spGoodstypeService.insert(spGoodstype);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
